
/// Importing all raw data (except questionnaire) as a stata database and including the dummy for treatments. ///
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191119_09491_subjects.xlsx", sheet("191119_09491_subjects") firstrow
g session = 1
g session1 = (session == 1)
g easy = 1
g perfectinfo = 1
save session1, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191119_09492_subjects.xlsx", sheet("191119_09492_subjects") firstrow 
g session = 1
g session2 = (session == 1)
g easy = 1
g perfectinfo = 1
save session2, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191119_12501_subjects.xlsx", sheet("191119_12501_subjects") firstrow
g session = 1
g session3 = (session == 1)
g easy = 0
g perfectinfo = 1
save session3, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191119_12512_subjects.xlsx", sheet("191119_12512_subjects") firstrow
g session = 1
g session4 = (session == 1)
g easy = 0
g perfectinfo = 1
save session4, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191119_14571_subjects.xlsx", sheet("191119_14571_subjects") firstrow
g session = 1
g session5 = (session == 1)
g easy = 1
g perfectinfo = 0
save session5, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191120_09441_subjects.xlsx", sheet("191120_09441_subjects") firstrow
g session = 1
g session6 = (session == 1)
g easy = 0
g perfectinfo = 0
save session6, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191120_09452_subjects.xlsx", sheet("191120_09452_subjects") firstrow
g session = 1
g session7 = (session == 1)
g easy = 0
g perfectinfo = 0
save session7, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191120_12491_subjects.xlsx", sheet("191120_12491_subjects") firstrow
g session = 1
g session8 = (session == 1)
g easy = 1
g perfectinfo = 1
save session8, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191120_12492_subjects.xlsx", sheet("191120_12492_subjects") firstrow
g session = 1
g session9 = (session == 1)
g easy = 1
g perfectinfo = 1
save session9, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191120_15091_subjects.xlsx", sheet("191120_15091_subjects") firstrow
g session = 1
g session10 = (session == 1)
g easy = 0
g perfectinfo = 1
save session10, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191120_15092_subjects.xlsx", sheet("191120_15092_subjects") firstrow
g session = 1
g session11 = (session == 1)
g easy = 0
g perfectinfo = 1
save session11, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191121_12401_subjects.xlsx", sheet("191121_12401_subjects") firstrow
g session = 1
g session12 = (session == 1)
g easy = 1
g perfectinfo = 0
save session12, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191121_12412_subjects.xlsx", sheet("191121_12412_subjects") firstrow
g session = 1
g session13 = (session == 1)
g easy = 1
g perfectinfo = 0
save session13, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191121_15161_subjects.xlsx", sheet("191121_15161_subjects") firstrow
g session = 1
g session14 = (session == 1)
g easy = 0
g perfectinfo = 0
save session14, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191121_15162_subjects.xlsx", sheet("191121_15162_subjects") firstrow
g session = 1
g session15 = (session == 1)
g easy = 0
g perfectinfo = 0
save session15, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191122_09381_subjects.xlsx", sheet("191122_09381_subjects") firstrow
g session = 1
g session16 = (session == 1)
g easy = 1
g perfectinfo = 1
save session16, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191122_09392_subjects.xlsx", sheet("191122_09392_subjects") firstrow
g session = 1
g session17 = (session == 1)
g easy = 1
g perfectinfo = 1
save session17, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191122_12121_subjects.xlsx", sheet("191122_12121_subjects") firstrow
g session = 1
g session18 = (session == 1)
g easy = 0
g perfectinfo = 1
save session18, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191122_12122_subjects.xlsx", sheet("191122_12122_subjects") firstrow
g session = 1
g session19 = (session == 1)
g easy = 0
g perfectinfo = 1
save session19, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191122_15031_subjects.xlsx", sheet("191122_15031_subjects") firstrow
g session = 1
g session20 = (session == 1)
g easy = 1
g perfectinfo = 0
save session20, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191122_15032_subjects.xlsx", sheet("191122_15032_subjects") firstrow
g session = 1
g session21 = (session == 1)
g easy = 1
g perfectinfo = 0
save session21, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191125_09321_subjects.xlsx", sheet("191125_09321_subjects") firstrow
g session = 1
g session22 = (session == 1)
g easy = 0
g perfectinfo = 0
save session22, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191125_09332_subjects.xlsx", sheet("191125_09332_subjects") firstrow
g session = 1
g session23 = (session == 1)
g easy = 0
g perfectinfo = 0
save session23, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191125_12191_subjects.xlsx", sheet("191125_12191_subjects") firstrow
g session = 1
g session24 = (session == 1)
g easy = 1
g perfectinfo = 1
save session24, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191125_12192_subjects.xlsx", sheet("191125_12192_subjects") firstrow
g session = 1
g session25 = (session == 1)
g easy = 1
g perfectinfo = 1
save session25, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191125_15101_subjects.xlsx", sheet("191125_15101_subjects") firstrow
g session = 1
g session26 = (session == 1)
g easy = 0
g perfectinfo = 1
save session26, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191125_15072_subjects.xlsx", sheet("191125_15072_subjects") firstrow
g session = 1
g session27 = (session == 1)
g easy = 0
g perfectinfo = 1
save session27, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191126_09451_subjects.xlsx", sheet("191126_09451_subjects") firstrow
g session = 1
g session28 = (session == 1)
g easy = 1
g perfectinfo = 0
save session28, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191126_09462_subjects.xlsx", sheet("191126_09462_subjects") firstrow
g session = 1
g session29 = (session == 1)
g easy = 1
g perfectinfo = 0
save session29, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191126_12241_subjects.xlsx", sheet("191126_12241_subjects") firstrow
g session = 1
g session30 = (session == 1)
g easy = 0
g perfectinfo = 0
save session30, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191126_12252_subjects.xlsx", sheet("191126_12252_subjects") firstrow
g session = 1
g session31 = (session == 1)
g easy = 0
g perfectinfo = 0
save session31, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191126_14521_subjects.xlsx", sheet("191126_14521_subjects") firstrow
g session = 1
g session32 = (session == 1)
g easy = 1
g perfectinfo = 1
save session32, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191126_14532_subjects.xlsx", sheet("191126_14532_subjects") firstrow
g session = 1
g session33 = (session == 1)
g easy = 1
g perfectinfo = 1
save session33, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191127_09311_subjects.xlsx", sheet("191127_09311_subjects") firstrow
g session = 1
g session34 = (session == 1)
g easy = 0
g perfectinfo = 1
save session34, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191127_09312_subjects.xlsx", sheet("191127_09312_subjects") firstrow
g session = 1
g session35 = (session == 1)
g easy = 0
g perfectinfo = 1
save session35, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191127_11471_subjects.xlsx", sheet("191127_11471_subjects") firstrow
g session = 1
g session36 = (session == 1)
g easy = 1
g perfectinfo = 0
save session36, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191127_11472_subjects.xlsx", sheet("191127_11472_subjects") firstrow
g session = 1
g session37 = (session == 1)
g easy = 1
g perfectinfo = 0
save session37, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191127_15031_subjects.xlsx", sheet("191127_15031_subjects") firstrow
g session = 1
g session38 = (session == 1)
g easy = 0
g perfectinfo = 0
save session38, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191127_15032_subjects.xlsx", sheet("191127_15032_subjects") firstrow
g session = 1
g session39 = (session == 1)
g easy = 0
g perfectinfo = 0
save session39, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191206_14102_subjects.xlsx", sheet("191206_14102_subjects") firstrow
g session = 1
g session40 = (session == 1)
g easy = 1
g perfectinfo = 0
save session40, replace
clear all

/// Importing the raw data of the questionnaire as a stata database///

import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191119_09491_q.xlsx", sheet("191119_09491") cellrange(A2:R14) firstrow
g session = 1
g session1 = (session == 1)
save session1q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191119_09492_q.xlsx", sheet("191119_09492") cellrange(A2:R14) firstrow 
g session = 1
g session2 = (session == 1)
save session2q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191119_12501_q.xlsx", sheet("191119_12501") cellrange(A2:R14) firstrow
g session = 1
g session3 = (session == 1)
save session3q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191119_12512_q.xlsx", sheet("191119_12512") cellrange(A2:R14) firstrow
g session = 1
g session4 = (session == 1)
save session4q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191119_14571_q.xlsx", sheet("191119_14571") cellrange(A2:R14) firstrow
g session = 1
g session5 = (session == 1)
save session5q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191120_09441_q.xlsx", sheet("191120_09441") cellrange(A2:R14) firstrow
g session = 1
g session6 = (session == 1)
save session6q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191120_09452_q.xlsx", sheet("191120_09452") cellrange(A2:R14) firstrow
g session = 1
g session7 = (session == 1)
save session7q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191120_12491_q.xlsx", sheet("191120_12491") cellrange(A2:R14) firstrow
g session = 1
g session8 = (session == 1)
save session8q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191120_12492_q.xlsx", sheet("191120_12492") cellrange(A2:R14) firstrow
g session = 1
g session9 = (session == 1)
save session9q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191120_15091_q.xlsx", sheet("191120_15091") cellrange(A2:R14) firstrow
g session = 1
g session10 = (session == 1)
save session10q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191120_15092_q.xlsx", sheet("191120_15092") cellrange(A2:R14) firstrow
g session = 1
g session11 = (session == 1)
save session11q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191121_12401_q.xlsx", sheet("191121_12401") cellrange(A2:R14) firstrow
g session = 1
g session12 = (session == 1)
save session12q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191121_12412_q.xlsx", sheet("191121_12412") cellrange(A2:R14) firstrow
g session = 1
g session13 = (session == 1)
save session13q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191121_15161_q.xlsx", sheet("191121_15161") cellrange(A2:R14) firstrow
g session = 1
g session14 = (session == 1)
save session14q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191121_15162_q.xlsx", sheet("191121_15162") cellrange(A2:R14) firstrow
g session = 1
g session15 = (session == 1)
save session15q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191122_09381_q.xlsx", sheet("191122_09381") cellrange(A2:R14) firstrow
g session = 1
g session16 = (session == 1)
save session16q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191122_09392_q.xlsx", sheet("191122_09392") cellrange(A2:R14) firstrow
g session = 1
g session17 = (session == 1)
save session17q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191122_12121_q.xlsx", sheet("191122_12121") cellrange(A2:R14) firstrow
g session = 1
g session18 = (session == 1)
save session18q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191122_12122_q.xlsx", sheet("191122_12122") cellrange(A2:R14) firstrow
g session = 1
g session19 = (session == 1)
save session19q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191122_15031_q.xlsx", sheet("191122_15031") cellrange(A2:R14) firstrow
g session = 1
g session20 = (session == 1)
save session20q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191122_15032_q.xlsx", sheet("191122_15032") cellrange(A2:R14) firstrow
g session = 1
g session21 = (session == 1)
save session21q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191125_09321_q.xlsx", sheet("191125_09321") cellrange(A2:R14) firstrow
g session = 1
g session22 = (session == 1)
save session22q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191125_09332_q.xlsx", sheet("191125_09332") cellrange(A2:R14) firstrow
g session = 1
g session23 = (session == 1)
save session23q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191125_12191_q.xlsx", sheet("191125_12191") cellrange(A2:R14) firstrow
g session = 1
g session24 = (session == 1)
save session24q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191125_12192_q.xlsx", sheet("191125_12192") cellrange(A2:R14) firstrow
g session = 1
g session25 = (session == 1)
save session25q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191125_15101_q.xlsx", sheet("191125_15101") cellrange(A2:R14) firstrow
g session = 1
g session26 = (session == 1)
save session26q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191125_15072_q.xlsx", sheet("191125_15072") cellrange(A2:R14) firstrow
g session = 1
g session27 = (session == 1)
save session27q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191126_09451_q.xlsx", sheet("191126_09451") cellrange(A2:R14) firstrow
g session = 1
g session28 = (session == 1)
save session28q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191126_09462_q.xlsx", sheet("191126_09462") cellrange(A2:R14) firstrow
g session = 1
g session29 = (session == 1)
save session29q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191126_12241_q.xlsx", sheet("191126_12241") cellrange(A2:R14) firstrow
g session = 1
g session30 = (session == 1)
save session30q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191126_12252_q.xlsx", sheet("191126_12252") cellrange(A2:R14) firstrow
g session = 1
g session31 = (session == 1)
save session31q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191126_14521_q.xlsx", sheet("191126_14521") cellrange(A2:R14) firstrow
g session = 1
g session32 = (session == 1)
save session32q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191126_14532_q.xlsx", sheet("191126_14532") cellrange(A2:R14) firstrow
g session = 1
g session33 = (session == 1)
save session33q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191127_09311_q.xlsx", sheet("191127_09311") cellrange(A2:R14) firstrow
g session = 1
g session34 = (session == 1)
save session34q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191127_09312_q.xlsx", sheet("191127_09312") cellrange(A2:R14) firstrow
g session = 1
g session35 = (session == 1)
save session35q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191127_11471_q.xlsx", sheet("191127_11471") cellrange(A2:R14) firstrow
g session = 1
g session36 = (session == 1)
save session36q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191127_11472_q.xlsx", sheet("191127_11472") cellrange(A2:R14) firstrow
g session = 1
g session37 = (session == 1)
save session37q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191127_15031_q.xlsx", sheet("191127_15031") cellrange(A2:R14) firstrow
g session = 1
g session38 = (session == 1)
save session38q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191127_15032_q.xlsx", sheet("191127_15032") cellrange(A2:R14) firstrow
g session = 1
g session39 = (session == 1)
save session39q, replace
clear all
import excel "C:\Users\petros\Dropbox\Prj_SelfConfidence_Teamwork_Luis\Data and Dofile\RawData\191206_14102_q.xlsx", sheet("191206_1410") cellrange(A2:R14) firstrow
g session = 1
g session40 = (session == 1)
save session40q, replace
clear all

/// appending all the raw databases, except questionnaire content, into one database ///

append using session1 session2 session3 session4 session5 session6 session7 session8 session9 session10 session11 session12 session13 session14 session15 session16 session17 session18 session19 session20 session21 session22 session23 session24 session25 session26 session27 session28 session29 session30 session31 session32 session33 session34 session35 session36 session37 session38 session39 session40, force

save datawithoutquestions, replace

/// appending all the questionnaire raw databases into one database /// 

preserve
clear all
append using session1q session2q session3q session4q session5q session6q session7q session8q session9q session10q session11q session12q session13q session14q session15q session16q session17q session18q session19q session20q session21q session22q session23q session24q session25q session26q session27q session28q session29q session30q session31q session32q session33q session34q session35q session36q session37q session38q session39q session40q, force

/// giving a unique subject ID to each different person who participated into an experiment ///
rename Subject subject
g dataset = 0
g period = 0
forv i = 1/40{
replace subject = subject + 12*`i' - 12 if session`i' == 1
}
/// giving a 
forv i = 1/20{
replace dataset = `i'
replace period = `i' if dataset == `i'
save data`i', replace
 }
clear all
append using data1 data2 data3 data4 data5 data6 data7 data8 data9 data10 data11 data12 data13 data14 data15 data16 data17 data18 data19 data20
save datasets, replace
restore

/// rename subject names in self-explanatory items ///
rename Subject subject
rename Period period
rename countcost clicks 
rename countscore catches

/// since there are two groups per session, we give an unique SessionID per group of 12 (24 people participated in a session) ///

forv i = 1/40{
replace subject = subject + 12*`i' - 12 if session`i' == 1
}

forv i = 1/240{
replace SessionID = "191119_09491" in `i'
}

forv i = 241/480{
replace SessionID = "191119_09492" in `i'
}

forv i = 1681/1920{
replace SessionID = "191120_12491" in `i'
}

forv i = 1921/2160{
replace SessionID = "191120_12492" in `i'
}

forv i = 2161/2400{
replace SessionID = "191120_15091" in `i'
}

forv i = 2401/2640{
replace SessionID = "191120_15092" in `i'
}

forv i = 3121/3360{
replace SessionID = "191121_15161" in `i'
}

forv i = 3361/3600{
replace SessionID = "191121_15162" in `i'
}

forv i = 4081/4320{
replace SessionID = "191122_12121" in `i'
}

forv i = 4321/4560{
replace SessionID = "191122_12122" in `i'
}

forv i = 4561/4800{
replace SessionID = "191122_15031" in `i'
}

forv i = 4801/5040{
replace SessionID = "191122_15032" in `i'
}

forv i = 5521/5760{
replace SessionID = "191125_12191" in `i'
}

forv i = 5761/6000{
replace SessionID = "191122_12192" in `i'
}

forv i = 7921/8160{
replace SessionID = "191127_09311" in `i'
}

forv i = 8161/8400{
replace SessionID = "191127_09312" in `i'
}

forv i = 8401/8640{
replace SessionID = "191127_11471" in `i'
}

forv i = 8641/8880{
replace SessionID = "191127_11472" in `i'
}

forv i = 8881/9120{
replace SessionID = "191127_15031" in `i'
}

forv i = 9121/9360{
replace SessionID = "191127_15032" in `i'
}

/// merging the datasets by subject and period ///


merge 1:1 subject period using datasets, gen(datasets)

/// clean data and drop all variables which not help for data analysis ///

drop cervelet grossesse inferiore premier chimique evolution solaire pieuvre teoria carnassiers fleuve fleuve_ch toronto silicon orient golden capitaleusa wallstreet disneyworld iceberg super roilion force harry missionimpossible indiana rockclassique mick romance darkside handicap freddie explorateur historique atomique spiritual president guerresmondiales conquistadores peuple languesnationales federale linguapiuparlata linguamenoparlata canton colori_marghe answer pagina answer_0* answer_10 answer_1* answer_20 answer_2* answer_30 answer_3* answer_40 answer_4* nazi radio drogue antibiotiques chiffre maladie voler vaccin tremblement volume isaac montagne aspen capitaleaustralia landlock_1 landlock_2 mer colonial turquie mexique_1 mexique_2 iles nominee faces afroactrice sarahjessica meilleuracteur killbill lucy dismantle plusvendu symphonies roidurock nigeria troia lincoln crash guerrepuniche chapelle moinspeuple plusgrand pluspetit trilingue immigrati_1 immigrati_2 bilingue_1 bilingue_2 bilingue_3 mimi coco TimeOKAYQUIZHARDOK TimePROCHAINEQUIZHARDOK TimePRECEDENTQUIZHARDOK TimeTERMINERQUIZHARDOK TimeOKANSWERSCOUNTEROK HL TimeOKRankDisplayPARTALOK TimeOKBEOWNRANK2OK estrankyes DrawSelectedperiodBSR BSRprof1 BSRprof2 TrueBSRProfit Table TreatmentNumber TreatmentNumber Table Profit TotalProfit Participate lambda lambda2 est_error error_square NumInGroup page page2 NumInGroup2 page3 page4 xstart ystart xtray q* c speed Deciderdraw probability delay TimeOKGENERALWELCOMEOK TimeOKQUIZEASYOK TimeSUIVANTQUIZEASYOK TimePRECEDENTQUIZEASYOK TimeTERMINERQUIZEASYOK computedanswer TimeOKCOUNTCORRECTANSWERSOK Profitquiz TimeOKBEOWNRANKOK ProfitBSR randev randresult1 TimeOKRankDisplayFULLOK randresult TimeOKInstructionsBallCatchingTa RemainingTime RemainingMinutes RemainingSeconds x1-x8 y1-y8 rand xstep LeaveStage TimeCommencerLaTcheCatchBallsInd TimeOKCatchBallsIndividualOK ProfitBCTtok ProfitBCT TimeOKReportIndividualOK GZ pr epr prpar eprpar TimeOKQuestionDeComprhensionS0OK TimeCommencerLaTcheCatchBallsS0O TimeOKCatchBallsS0OK TimeOKReportS0OK est_error2 error_square2 ProfitBSR2 TimeOKInstructionDistribPrefOK Decidermatched Decider ProfitDP TimeOKDistribPrefOK lined TimeOKComputationDPOK TimeOKInstructionsBRETTrialOK TimeOKInstructionsBRETOK bomb collectedBomb Profitbret TimeOKFINALBRETOK SelectedPeriod1 SelectedPeriod2 DrawSelectedperiod SelectedPeriod Quizprof BSRprofit BCTProfit DP BRETProfit TimeOKResultLastPeriodOK d1p-d10p 

/// reshape the trial results to merge them later as a additional variable besides the main results ///

preserve
keep subject period score catches clicks SessionID
keep if period < 9
g trialmultiplier = score/catches
g clickstrial = clicks
drop clicks
save trialresults, replace
restore

/// reshape the results of the estimate revision to merge them later as a additional varialbe besides the main results ///
preserve
keep subject period est_rankyes est_rank2 epr1 SessionID
keep if period == 17
g estimatedability2 = 260-20*est_rank2 if est_rankyes == 1
replace estimatedability2 = epr1 if est_rankyes == 0
drop period
g revision = 0
g period = 0
forv i = 1/8{
replace revision = `i'
replace period = `i' if revision == `i'
save revision`i', replace
 }
clear all
append using revision1 revision2 revision3 revision4 revision5 revision6 revision7 revision8
save allrevision, replace
restore

/// define social preferences dummies (using Balafatous et al. (2012) methodology) and reshape them in order to merge them later as additional variables besides the main results ///

preserve
keep subject period d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 SessionID
keep if period == 18
g preferencesefficiency = (((d1 == 0 & d2 == 0) | (d1 == 0 & d2 == 1) | (d1 == 1 & d2 == 1)) & (d3 == 1 & d4 == 1 & d5 == 1 & d6 == 0 & d7 == 0 & d8 == 0) & ((d9 == 1 & d10 == 1) | (d9 == 0 & d10 == 1) | (d9 == 0 & d10 == 0)))
g inequalityaversion = (((d4 == 1 & d5 == 1) | (d4 == 0 & d5 == 1) | (d4 == 0 & d5 == 0)) & (d1 == 0 & d2 == 0 & d3 == 0 & d6 == 0 & d7 == 0 & d8 == 0) & ((d9 == 1 & d10 == 1) | (d9 == 0 & d10 == 1) | (d9 == 0 & d10 == 0)))
g inequalityloving = (((d1 == 0 & d2 == 0) | (d1 == 0 & d2 == 1) | (d1 == 1 & d2 == 1)) & (d3 == 1 & d4 == 1 & d5 == 1 & d8 == 1 & d9 == 1 & d10 == 1) & ((d6 == 1 & d7 == 1) | (d6 == 1 & d7 == 0) |(d6 == 0 & d7 == 0))) 
g spiteful = (((d4 == 1 & d5 == 1) | (d4 == 0 & d5 == 1) | (d4 == 0 & d5 == 0)) & (d1 == 0 & d2 == 0 & d3 == 0 & d8 == 1 & d9 == 1 & d10 == 1) & ((d6 == 1 & d7 == 1) | (d6 == 1 & d7 == 0) |(d6 == 0 & d7 == 0)))
drop period
g preferences = 0
g period = 0
forv i = 1/8{
replace preferences = `i'
replace period = `i' if preferences == `i'
save preferences`i', replace
 }
clear all
append using preferences1 preferences2 preferences3 preferences4 preferences5 preferences6 preferences7 preferences8
save allpreferences, replace
restore

/// reshape the results of the Bomb Risk Elicitation task to measure risk aversion to merge them later as a additional varialbe besides the main results ///
preserve
keep subject period choice SessionID
keep if period == 20
g riskaversion = choice - 50
drop period
g risk = 0
g period = 0
forv i = 1/8{
replace risk = `i'
replace period = `i' if risk == `i'
save risk`i', replace
 }
clear all
append using risk1 risk2 risk3 risk4 risk5 risk6 risk7 risk8
save allrisk, replace
restore

/// cleaning data for henceforth irrelevant variables ///

drop if period < 9 | period > 16
drop d*

/// getting easier readable period numbers ///
replace period = period - 8

save datareplicationraw, replace 

/// merge all previously reshaped results beside main results ///

merge 1:1 subject period using trialresults, gen(trial)
merge 1:1 subject period using allpreferences, gen(pref)
merge 1:1 subject period using allrisk, gen(risks)
merge 1:1 subject period using allrevision, gen(revisions)

/// rename variables with self-explanatory items///

rename pr1 ownability /// own ability multiplier
rename epr1 estimatedability /// estimated ability multiplier 
rename prpar1 partnerability /// partner ability multiplier 
rename eprpar1 partnerestimatedability /// estimated partner ability multiplier 
rename ScoreTotal commonpot /// Teamrevenue in tokens 
rename ScoreAverage individualpot /// Half of Teamrevenue in tokens 

/// generate important variables for analysis

g teamrevenue = commonpot / 300 /// Teamrevenue in CHF (1 CHF = 300 tokens)
g payoffs = (individualpot - cost)/300 /// Individual payoffs in CHF
g ownbias = estimatedability - ownability /// own self-confidence bias 
g partnerbias = partnerestimatedability - partnerability /// partner self-confidence bias 
forv i = 1/8{
g period`i' = (period ==`i')
 } /// generate the period dummies
g ownabilityde = ownability/20 - 6.5 /// demeaned own ability multiplier using an integer-increment 
g estimatedabilityde = estimatedability/20 - 6.5 /// demeaned estimated ability multiplier using an integer-increment 
g estimatedability2de = estimatedability2/20 - 6.5 /// demeaned ability multiplier using an integer-increment 
g male = (gender == "Masculin") /// generate gender dummy with male = 1
g swiss = (Swiss_nat == "Suisse") /// generate swiss dummy 
g onlychild = (elderly == 0 & younger == 0) /// generate only child dummy 
g educationparents = ((edu_level_mother == "Université" & edu_level_father == "Université") | (edu_level_mother == "HEG, ESCA, ETS, HES" & edu_level_father == "HEG, ESCA, ETS, HES") | (edu_level_mother == "HEG, ESCA, ETS, HES" & edu_level_father == "Université") | (edu_level_mother == "Université" & edu_level_father == "Université")) /// generate a dummy when both mother and father went to university or university of applied sciences. 
g numberknown = numKnown /// generate a numerical variable of people known in the session
g bigtown = (size_town_of_origin == "10 000 à 100 000 habitants" | size_town_of_origin == "plus de 100 000 habitants") /// generate a dummy of whether you grew up in a  big town (In Switzerland is a big town > 10000 inhabitants)
g unil = (faculty == "UNIL - Faculté des Sciences Sociales et Politiques" | faculty == "UNIL - Faculté de Biologie et de Médecine" | faculty == "UNIL - Faculté des Hautes Etudes Commerciales" | faculty == "UNIL - Faculté de Droit et des Sciences Criminelles" | faculty == "UNIL - Faculté des Lettres" | faculty == "UNIL - Faculté des Géosciences et de l´Environment") /// generate a dummy variable indicating whether a subject pursue his/her studies at the University of Lausanne
g bachelor = (year_study == "1ère Bachelor" | year_study == "2ème Bachelor" | year_study == "3ème Bachelor") /// generate a dummy variable indicating whether a subject pursue is currently in Bachelor Studies. 
g grade = averageGrade /// generate a numerical variable about the subject grades.

/// generate group variable for the whole appended dataset ///

g subjectby2 = (subject+1)/2 /// 
replace Group = int(subjectby2)
rename Group pair
g clicksquaredroot = sqrt(clicks)
g ownbiassquared = ownbias^2

/// generate team level variables /// 

by pair period, sort: egen malesum = sum(male)
g malemale = (malesum == 2)
g malefemale = (malesum == 1)
by pair period, sort: egen teampayoffs = sum(payoffs)
by pair period, sort: egen ageteammean = mean(age)
by pair period, sort: egen riskaversionteammean = mean(riskaversion)
by pair period, sort: egen preferencesefficiencyteam = mean(preferencesefficiency)
by pair period, sort: egen inequalityaversionteam = mean(inequalityaversion)
by pair period, sort: egen inequalitylovingteam = mean(inequalityloving)
by pair period, sort: egen spitefulteam = mean(spiteful)
by pair period, sort: egen swisssum = sum(swiss)
g swissswiss = (swisssum == 2)
g swissother = (swisssum == 1)
by pair period, sort: egen onlychildteam = mean(onlychild)
by pair period, sort: egen educationparentsteam = mean(educationparents)
by pair period, sort: egen numberknownteam = mean(numberknown)
by pair period, sort: egen bigtownteam = mean(bigtown)
by pair period, sort: egen unilteam = mean(unil)
by pair period, sort: egen bachelorteam = mean(bachelor)
by pair period, sort: egen gradeteam = mean(grade)
by pair period, sort: egen abilitysubjecti = max(ownability)
by pair period, sort: egen abilitysubjectj = min(ownability)
by pair period, sort: egen biassubjecti = max(ownbias)
by pair period, sort: egen biassubjectj = min(ownbias)
g periodeasy = period*easy /// create a running variable with the period when the treatment is EASY
g partnerabilityperiod = partnerability*period /// create a running variable with the period interacted with partner ability multiplier
g partnerbiasperiod = partnerbias*period /// create a running variable with the period interacted with partner self-confidence bias 

/// create a dataset for the Main Treatments ///
preserve
keep if perfectinfo == 0
save "Dataset for Publication main.dta", replace
restore

/// create a dataset for the Additional Treatments ///
preserve 
keep if perfectinfo == 1
save "Dataset for Publication additional.dta", replace
restore





